home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1985 April
/
1985-04.d64
/
number quest_64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
3KB
|
92 lines
10 print"[147]";"just a moment..."
20 poke56,48:clr:k=12288:pc=56334:cp=53272
40 pokepc,peek(pc)and254:poke1,peek(1)and251
50 forj=0to4095:pokek+j,peek(53248+j):nextj
60 fori=216to255:reada%:pokek+i,a%:nexti:fori=280to295:reada%:pokek+i,a%:nexti
70 poke1,peek(1)or4:pokepc,peek(pc)or1
80 pokecp,21:bc=53280:bk=53281:pokebc,2:pokebk,1:print"[147]"
90 printspc(90)"[144] [167][205][165][165][167][167][205][206][165][207][165][207] [207][165]"
100 print" [167] [165][204][186][167] [165][207][165][207] [207][165]"
110 printtab(21)"[163] [163]"
120 print:print" [207][208] [165][167] [207] [207] [208][207]"
130 print" [204][186][187][204][186] [207] [208] [167][165]"
140 printtab(19)"[163] [163]"
150 printspc(131)"press the f1 key"
160 v=54272:forsl=vtov+24:pokesl,0:next
170 pokev+5,88:pokev+4,33:pokev+24,143:pokev+6,195
180 readlf,hf,dr:iflf=-1then200
190 pokev,lf:pokev+1,hf:fort=1todr:nextt:goto180
200 pokev,0:pokev+1,0:pokev+24,0
210 geta$:ifa$=""then210
220 ifa$=chr$(133)then240
230 goto210
240 print"[147]":pokebc,7:pokebk,15
250 printspc(211)"[144]you have 5 [144]turns":printspc(51)"to guess a number"
260 printspc(51)"[144]from 10 [144]to 100":printspc(211)"press the f1 key"
270 geta$:ifa$=""then270
280 ifa$=chr$(133)then300
290 goto270
300 print"[147]":pokebc,6:pokebk,1:tn=1:pokecp,(peek(cp)and240)+12
310 printspc(92)"guess the number"
320 print:printtab(24)"[144][\":print"":printtab(19)"[144]]"
330 print"[144]]]]]]]]]]]]]]]]]]]]]]]]]]^^^^[144]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]";
340 for t= 1to2
350 print"[144]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]";
360 next
370 forn=0to40:poke1983+n,29:poke56255+n,0:nextn
380 print"[145][145][145][145][145][145][145][145][145][145][145][145][145][145][145]"
390 r=int(rnd(1)*90+10)
400 print"[144] turn: ";"";tn:print
410 print" ";
420 s$="":inputs$:s=val(s$):ifs<1ors>100thengosub690:print"";:goto400
430 for u= 1 to len(s$):ut=asc(mid$(s$,u,1))
440 if ut<48orut>57then u=len(s$):gosub690:next:print"";:goto400
450 next
460 if s>2 then490
470 print"[144] that's too easy":for t=0to1000:next:print"[145] [145][145]"
480 goto410
490 ifs=rthen780
500 tn=tn+1:iftn=6then530
510 ifs>rthen610
520 ifs<rthen630
530 pokev+24,143:form=60to30step-2:pokev,int(m/3):pokev+1,m:fort=1to10:nextt
540 nextm:pokev+24,0
550 p=14:gosub710:pokex,36:pokecx,6:pokex+40,30:pokecx+40,6
560 form=125to15step-5:pokev+24,m:fort=1to20:nextt:nextm:pokev+24,0
570 print"[147]":pokesc,216:printspc(210)"[144]sorry, you missed"
580 printspc(130)"the number was ";r
590 printspc(49)"[144]better luck next time":foru=1to 1200:nextu
600 goto850
610 d=int(s/r):d$="high":ifd<=1then680
620 goto640
630 d=int(r/s):d$="low":ifd<=1then680
640 print" ";d;"[144] times too ";"";d$
650 pokev+24,143:form=50to0step-1:pokev,int(m/2):pokev+1,m:nextm
660 fort=1to600:next:pokev+24,0
670 print"[145] ":print"[145][145][145][145][145]":goto400
680 print" too ";"";d$:fort=1to400:next:goto650
690 print" try 1-100 ":fort=1to800:nextt
700 print"[145] ":print"[145][145][145][145][145]";:return
710 x=1024+(5*40)+26:cx=x+54272:z=1024+(5*40)+24:cz=z+54272
720 forn=1top:pokez,32:pokez+1,32:pokex,32:pokex+40,32
730 pokez-1,27:pokecz-1,0:pokez,28:pokecz,0
740 pokex+40,31:pokecx+40,2:pokex+80,35:pokecx+80,0
750 z=z-1:cz=cz-1:x=x+40:cx=cx+40:nextn:return
760 bl=53265:forn=1to6:pokebl,peek(bl)and239:fort=1to50:nextt
770 pokebl,peek(bl)or16:fort=1to40:nextt:nextn:return
780 gosub760:p=5:gosub710:forn=1to7
790 pokex,32:pokex+40,32
800 pokex+39,31:pokecx+39,2:pokex+79,35:pokecx+79,0:x=x+39:cx=cx+39:nextn
810 pokev+24,143:form=30to60:pokev,int(m/2):pokev+1,m:fort=1to10:nextt:nextm
820 pokev+24,0:pokev,0:pokev+1,0
830 print"[147]":pokebc,2:pokebk,1:print:print:printspc(130)"[144]**congratulations**"
840 printspc(173)"you guessed it"
850 printspc(191);
860 for q= 1to 1000:next:tn=1:goto300
870 data255,1,1,1,127,255,255,127,255,0,0,3,3,255,255,0
880 data255,255,255,255,255,255,255,255,170,170,255,255,255,255,255,255
890 data60,126,255,255,129,66,36,24,16,18,60
900 data88,40,36,66,0,17,130,68,37,6,148,93,126
910 data31,21,200,30,25,450,31,21,200,96,22,200,30,25,200,96,22,200,31,21,200
920 data30,25,500,-1,-1,-1